package com.ygl.core.adapter;

import com.netflix.loadbalancer.Server;
import com.ygl.common.entity.RuleEntity;

import java.util.Map;

/**
 * author: yanggld
 * date: 2019/12/14 12:31
 * version: 1.0
 * description: CoreAdapter
 */
public interface CoreAdapter {

    String getServiceId();

    String getGroup();

    String getHost();

    int getPort();

    Map<String, String> getMetadata();

    String getVersion();

    String getRegion();

    String getEnvironment();

    Map<String, String> getServerMetadata(Server server);

    String getServerVersion(Server server);

    String getServerRegion(Server server);

    String getServerEnvironment(Server server);

    RuleEntity getRule();

    void setRule(RuleEntity ruleEntity);

    String getServerServiceId(Server server);

}